<!doctype html>
<html>
<head>
  <script src="/freecdn-loader.min.js"></script>
  <title>Bundle Demo</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
  <h1>Bundle Demo</h1>
  <button id="btnShow">Load Icons</button>
  <div id="divIcons"></div>
  <script>
    btnShow.onclick = async function() {
      const res = await fetch('assets/data/list.txt')
      const txt = await res.text()

      for (const id of txt.split('\n')) {
        const img = new Image()
        img.width = 36
        img.height = 36
        img.src = 'assets/img/emoji/' + id
        divIcons.appendChild(img)
      }
    }

    divIcons.onclick = function(e) {
      if (e.target.tagName === 'IMG') {
        open(e.target.src)
      }
    }
  </script>
</body>
</html>